import React, { Component } from 'react'
import styles from './index.module.scss'
import CarouseiExample from './component/CarouseiExample'
import NavImg from './component/navImg'
import Group from './component/Group'
import Message from './component/Message'
// import Flex from '../../dome/flex'

export default class Home extends Component {
  state = {
    // 这里是从轮播图页面拿到的code地图地址码
    cityArea: ''
  }
  execLogin = cityArea =>{
    this.setState({
      cityArea
    })
}
  render() {
    return (
      <div className={styles.home}>
        {/* 轮播图- */}
        <div className={styles.slides}>
          <CarouseiExample history={this.props.history} callback={this.execLogin}/>                    
        </div>
        {/*  {/* 导航菜单 */}
          <NavImg history={this.props.history}/>
        {/* 租房小组 */}
        <div>
          <Group cityArea={this.state.cityArea}/>
        </div>
        {/* 最新资讯 */}
        <Message cityArea={this.state.cityArea}/>
      </div>
    )
  }
}

